﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;

public class ShowScore : MonoBehaviour
{
    public Text scoreT;
    string score;

    // public AudioClip die;

    // Start is called before the first frame update
    void Start()
    {
        // AudioSource.PlayClipAtPoint(die,gameObject.transform.position);
        score = PlayerPrefs.GetString("score");
        this.GetComponent<Button>().onClick.AddListener(OnClick);
    }

    // Update is called once per frame
    void Update()
    {
        scoreT.text = "Score:" + score;
    }
    void OnClick(){
        SceneManager.LoadScene("SampleScene");
    }
}
